MAX32666 port#804
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new hardware target port for Analog Devices/Maxim MAX32666 (and MAX32665 family overlap), including bootloader HAL support plus an optional wolfCrypt hardware-acceleration test application flow.
Changes:
- Introduces MAX32666 HAL implementation (clock/UART/flash) and linker scripts for both wolfBoot and the test app.
- Adds MAX32666-specific build options and test-app wiring for MSDK TPU/MAA/TRNG acceleration.
- Updates shared infrastructure (string/memset behavior for ARM, wolfSSL user settings gating, keytools flags) to support the new target.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/openocd/max32665.cfg | Adds OpenOCD configuration for MAX32665/MAX32666 dual-bank flash programming. |
| tools/keytools/Makefile | Adjusts keytools build flags for ML-DSA/Dilithium configuration. |
| test-app/syscalls.c | Enhances bare-metal heap allocator to reclaim top-of-heap allocations and support in-place realloc. |
| test-app/Makefile | Adds MAX32666-specific build/test knobs, linker script selection, and MSDK object wiring for HW crypto tests. |
| test-app/ARM-max32666.ld | Adds a MAX32666 test-app linker script (FLASH/RAM layout, heap/stack symbols). |
| test-app/app_max32666.c | New MAX32666 test application including optional AES-GCM and ECDHE KATs using hardware acceleration. |
| src/string.c | Updates memset to use aligned word writes on ARM/AARCH64; adds stdint include. |
| include/user_settings.h | Adjusts wolfSSL feature gating for the MAX32666 crypto test mode and SP math defines. |
| hal/max32666.ld | New MAX32666 wolfBoot linker script. |
| hal/max32666.h | New MAX32666 register/bitfield definitions and debug UART selection. |
| hal/max32666.c | New MAX32666 HAL implementation (watchdog/clock/cache/UART/flash operations). |
| docs/Targets.md | Documents MAX32666 target build/flash/run instructions and configuration options. |
| config/examples/max32666.config | Adds an example configuration for building wolfBoot for MAX32666 (TPU enabled). |
| arch.mk | Adds MAX32666 target build logic, MSDK include/obj wiring, and enables FAST_MEMCPY for ARM builds. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Reclaim is no longer needed with streaming SHA implementation in wolfSSL.
This port requires wolfSSL/wolfssl#10733
a5f9771 to
ef26620
Compare
6e4e471 to
8dc9512
Compare
| MT29F8G01ADBFD12) as firmware update storage: | ||
|
|
||
| ```sh | ||
| cp config/examples/max32666-nand.config .config |
There was a problem hiding this comment.
Missing example config file mentioned here
| CFLAGS+=-DWOLFSSL_PPC32_ASM -DWOLFSSL_PPC32_ASM_INLINE | ||
| #CFLAGS+=-DWOLFSSL_PPC32_ASM_SMALL | ||
| MATH_OBJS+=$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/ppc32/ppc32-sha256-asm_c.o | ||
| MATH_OBJS+=$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/ppc32/ppc32-sha512-asm_c.o |
There was a problem hiding this comment.
this change does not seem related to this PR.
There was a problem hiding this comment.
This fixes an issue that arose after updating the wolfssl submodule which caused PPC builds to fail (e.g. nxp-t1024). wolfSSL's sha512.c now declares extern void Transform_Sha512_Len when WOLFSSL_PPC32_ASM is defined, so the implementation from ppc32-sha512-asm_c.c is needed.
Port for Maxim's MAX32666, including hardware-acceleration.